﻿using System.Collections.Generic;
using System.IO;
using System.Xml;

namespace Renren.Helpers
{
    public class BlogPaser
    {
        public static void Parse(string content)
        {
            var list = new List<string>();
            var stream = new StringReader("<body>" + content + "</body>");
            var reader = XmlReader.Create(stream);
            while (reader.Read())
            {
                list.Add("111 " + reader.NodeType.ToString());
                list.Add("222 " + reader.Name);
                list.Add("333 " + reader.Value);
                list.Add("444 " + reader.ValueType);
                list.Add("555 " + reader.Prefix);
                list.Add("666 " + reader.LocalName);
                list.Add("777 " + reader.HasValue);
                list.Add("888 " + reader.HasAttributes);
                list.Add("999 " + reader.Depth);
            }
            var t = list.Count;
        }
    }

}
